@extends('host.common.common')
@section('head')



    <script src="/assets/b2b/js/pageConfig.js"></script>
    <script type="text/javascript" src="/assets/b2b/js/libs/jquery-1.11.3.min.js"></script>
    <script type="text/javascript" src="/assets/b2b/js/libs/underscore-min.js"></script>
    <script type="text/javascript" src="/assets/b2b/js/libs/jquery.paging.min.js"></script>
    <script type="text/javascript" src="/assets/b2b/js/libs/page/template-util.js"></script>
    <script type="text/javascript">
        var PAGE_DATA = {
            userid: "{{ Auth::check() ? Auth::user()->id : '' }}",
            buy:'{{$buy}}',
        };
    </script>


    @stop
    @section('body')
            <!-- top_test -->
    <div id="top_test"></div>

    <!-- web_logo_search -->
    <div id="web_logo_search"></div>

    <!-- comm_nav -->
    <div id="comm_nav"></div>

    <div class="com-w mt20">
        <div class="look-shopping-cart">
            <div class="shopping-cart-top">
                <div class="cart-top-left confirm-consignee">
                    <span class="cart-bg"></span>
                    <span class="f20 lh90">请确认并提交订单</span>
                </div>
                <div class="cart-top-right confirm-consignee">
                    <div class="top-right-logo"></div>
                </div>
            </div>
            <div class="confirm-consignee-data clearfix">
                <div class="invoice-left clearfix fl">
                    <div class="data-list">
                        <div class="data-title">
                            <div class="f14 ml10 lh40">确认收货人资料以及送货方式</div>
                        </div>
                        <div class="data-main clearfix">

                            <div id="addr-box"> </div>

                            <div class="choose-address clearfix">
                                <label for="user_new_address">
                                    <div class="choose-radio ml20 mt5">
                                        <input type="radio" name="addr" id="user_new_address" /></div>
                                    <div class="data-address ">
                                        <div>使用新的收货地址</div>
                                    </div>
                                </label>
                            </div>
                            <div id="add-address-box" class="add-address" style="display: none">
                                <form id="add-address-form">
                                    <div class="clearfix">
                                        <div class="add-a-l fl tr lh30 mt10 wb30 f14">收货人姓名：</div>
                                        <div class="add-a-r fl mt10 wb65">
                                            <input type="text" id="receiver" name="receiver"></div>
                                    </div>
                                    <div class="clearfix">
                                        <div class="add-a-l fl tr lh30 mt10 wb30 f14">所在地区：</div>
                                        <div class="add-a-r fl mt10 wb65 input-info">
                                            <!--   <input type="text" id="district" name="district" />-->
                                            <select id="province" name="province" >
                                                <option value="">请选择</option>
                                            </select>

                                            <select id="city" name="city" >
                                                <option value="">请选择</option>
                                            </select>

                                            <select id="country" name="country" >
                                                <option value="">请选择</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="clearfix">
                                        <div class="add-a-l fl tr lh30 mt10 wb30 f14">详细地址：</div>
                                        <div class="add-a-r fl mt10 wb65 detailed-address-inp">
                                            <input type="text" id="detail_addr" name="detail_addr" />
                                        </div>
                                    </div>
                                    <div class="clearfix">
                                        <div class="add-a-l fl tr lh30 mt10 wb30 f14">手机号码：</div>
                                        <div class="add-a-r fl mt10 wb30">
                                            <input type="text" id="mob_tel" name="mob_tel"  /></div>
                                        <!-- <div class="add-a-l fl tr lh30 mt10 f14">(或)固定电话：</div>
                                        <div class="add-a-r fl mt10 wb23">
                                            <input type="text" id="fix_tel" name="fix_tel"  />
                                        </div> -->
                                    </div>
                                    <div class="a-keep-btn tc mt30" style="width: 73%">
                                        <div id="save-addr-btn" class="btn btn-important btn-w150x48 lh35 mb20">保存收货信息</div>
                                    </div>
                                </form>
                            </div>

                        </div>

                    </div>

                    <div class="data-list  mt15 invoice-list">
                        <div class="data-title">
                            <div class="f14 ml10 lh40">发票信息</div>
                        </div>
                        <div class="data-main clearfix">
                            <div class="d-main-t" style="height: 55px;">
                                <div class=" f14 ml20 wb97 lh50">类型和抬头</div>
                            </div>

                            <div id="invoice-box"></div>

                            <div class="choose-address clearfix">
                                <label for="user_new_invoice">
                                    <div class="choose-radio ml20 f14">
                                        <input type="radio" name="invoice-item" id="user_new_invoice">
                                        <span class="ml15 f14 lh30">使用新的发票信息</span>
                                    </div>
                                </label>
                            </div>
                            <div id="add-invoice-box" class="invoice-add" style="display: none">
                                <div id="add_invoice_form">
                                    <div class="invoice-top">
                                        <div class="clearfix">
                                            <div class="add-a-l fl tr lh30 mt10 wb35 f14">发票类型：</div>
                                            <div class="add-a-r fl mt10 wb60 invoice-chose">
                                                <div class="fl ">
                                                    <label for="comm-invoice" class="f14 lh30">
                                                        <input type="radio" name="invoice" id="comm-invoice" value="0" />普通发票</label>
                                                </div>
                                                <div class="fl f14 lh30 ml20">
                                                    <label for="value-added" class="f14 lh30">
                                                        <input type="radio" name="invoice" id="value-added" value="1" />增值税发票</label>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="invoice-content">
                                            <form id="sel-invoice-0" class="clearfix" style="">
                                                <!-- comm-invoice -->
                                                <div class="clearfix" >
                                                    <div class="add-a-l fl tr lh30 mt10 wb35 f14">发票抬头：</div>
                                                    <div class="add-a-r fl mt10 wb60 invoice-category">
                                                        <div class="fl">
                                                            <label for="personal" class="f14 lh30">
                                                                <input type="radio" name="category" id="personal" value="0" checked>个人</label>
                                                        </div>
                                                        <div class="f14 lh30 fl" style="margin-left: 47px;">
                                                            <label for="unit" class="f14 lh30">
                                                                <input type="radio" name="category" id="unit" value="1" />单位</label>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="clearfix">
                                                    <div class="add-a-l fl tr lh30 mt10 wb35 f14">单位名称：</div>
                                                    <div class="add-a-r fl mt10 autosave c-999">
                                                        <input type="text" id="company_name" name="company_name" />
                                                        <input type="checkbox" id="auto-save" name="auto-save" checked /><label for="auto-save">自动保存发票信息</label>

                                                    </div>
                                                </div>
                                                <div class="clearfix">
                                                    <div class="add-a-l fl tr lh30 mt10 wb35 f14">发票内容：</div>
                                                    <div class="add-a-r fl mt10 wb26 c-333 autosave lh30">
                                                        <input type="radio" id="detail_0" name="detail_0" value="1" checked />
                                                        <label for="detail_0">明细</label>
                                                    </div>
                                                </div>
                                                <div class="clearfix">
                                                    <div class=" fl lh30 mt10 wb95 f14 c-yer ml30 ">注：咖啡集散交易平台商品均由第三方供应商销售，发票内容由供应商决定，发票由第三方供应商开具寄出。</div>
                                                </div>
                                            </form>
                                            <form id="sel-invoice-1" class="clearfix" style="display: none">
                                                <!-- value-added -->
                                                <div class="mt40 ml70 wb35 f14 c-999 lh30 fl tc">增值票资质信息：</div>
                                                <div class="mt40 ml70 wb30 f14 fl clearfix lh30" style="height: 30px;"></div>
                                                <div class="clearfix">
                                                    <div class="clearfix mt10">
                                                        <div class="invoice-l wb30 tr f14 fl lh32 c-999">单位名称：</div>
                                                        <div class="invoice-r wb60 fl">
                                                            <input type="text" id="company_name_1" name="company_name" />
                                                            <span class="b002 ml5">*</span>
                                                        </div>
                                                    </div>
                                                    <div class="clearfix mt10">
                                                        <div class="invoice-l wb30 tr f14 fl lh32 c-999">纳税人识别码：</div>
                                                        <div class="invoice-r wb60 fl">
                                                            <input type="text" id="taxpayer_code" name="taxpayer_code" />
                                                            <span class="b002 ml5">*</span>
                                                        </div>
                                                    </div>
                                                    <div class="clearfix mt10">
                                                        <div class="invoice-l wb30 tr f14 fl lh32 c-999">注册地址：</div>
                                                        <div class="invoice-r wb60 fl">
                                                            <input type="text" id="regist_addr" name="regist_addr" />
                                                            <span class="b002 ml5">*</span>
                                                        </div>
                                                    </div>
                                                    <div class="clearfix mt10">
                                                        <div class="invoice-l wb30 tr f14 fl lh32 c-999">注册电话：</div>
                                                        <div class="invoice-r wb60 fl">
                                                            <input type="text" id="regist_tel" name="regist_tel" />
                                                            <span class="b002 ml5">*</span>
                                                        </div>
                                                    </div>
                                                    <div class="clearfix mt10">
                                                        <div class="invoice-l wb30 tr f14 fl lh32 c-999">开户银行：</div>
                                                        <div class="invoice-r wb60 fl">
                                                            <input type="text" id="bank" name="bank" />
                                                            <span class="b002 ml5">*</span>
                                                        </div>
                                                    </div>
                                                    <div class="clearfix mt10">
                                                        <div class="invoice-l wb30 tr f14 fl lh32 c-999">银行账户：</div>
                                                        <div class="invoice-r wb60 fl">
                                                            <input type="text" id="bankCard" name="bankCard" />
                                                            <span class="b002 ml5">*</span>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="mt40 ml70 wb35 f14 c-999 lh30 fl tc">收票人地址：</div>
                                                <div class="mt40 ml70 wb30 f14 fl clearfix lh30" style="height: 30px;"></div>
                                                <div class="clearfix">
                                                    <div class="clearfix mt10">
                                                        <div class="invoice-l wb30 tr f14 fl lh32 c-999">收票人姓名：</div>
                                                        <div class="invoice-r wb60 fl">
                                                            <input type="text" id="receiver_name" name="receiver_name" />
                                                            <span class="b002 ml5">*</span>
                                                        </div>
                                                    </div>
                                                    <div class="clearfix mt10">
                                                        <div class="invoice-l wb30 tr f14 fl lh32 c-999">收票人手机：</div>
                                                        <div class="invoice-r wb60 fl">
                                                            <input type="text"  id="mobile" name="mobile" />
                                                            <span class="b002 ml5">*</span>
                                                        </div>
                                                    </div>
                                                    <div class="clearfix mt10">
                                                        <div class="invoice-l wb30 tr f14 fl lh32 c-999">收票人省份：</div>
                                                        <div class="invoice-r wb60 fl">
                                                            <select id="province" name="province" style="width:100px;height:32px;">
                                                            </select>
                                                            <span class="b002 ml5">*</span>
                                                        </div>
                                                    </div>
                                                    <div class="clearfix mt10">
                                                        <div class="invoice-l wb30 tr f14 fl lh32 c-999">详细地址：</div>
                                                        <div class="invoice-r wb60 fl">
                                                            <input type="text" id="detail_addr" name="detail_addr" />
                                                            <span class="b002 ml5">*</span>
                                                        </div>
                                                    </div>
                                                    <div class="clearfix mt10">
                                                        <div class="invoice-l wb30 tr f14 fl lh32 c-999">发票内容：</div>
                                                        <div class="invoice-r wb60 fl autosave lh32">
                                                            <input type="radio" id="detail_1" name="detail_1" value="1" checked />

                                                            <label for="detail_1">明细</label>

                                                        </div>
                                                    </div>
                                                </div>
                                            </form>
                                        </div>
                                    </div>
                                    <div class="invoice-bottom mt100"></div>
                                </div>
                                <div class="a-keep-btn tc mt15 wb85 mb20">
                                    <div id="save-invoice-btn" class="btn btn-important btn-w200x48 lh40 ">保存发票信息</div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div id="store-box" class="clearfix"></div>

                    <div class="invoice-main-bottom mt15 fr">
                        <div class="f16 fr b002 lh80 mr20">￥<span id="shop-cart-total" class="f20">19900000.00</span>(不含运费)</div>
                        <div class="clearfix fr f14 c-999 lh80 ml30">订单商品总额：</div>
                    </div>

                    <div class="f14 c-999 ml50 fr">
                        <form id="new-order-form" style="display:none;" method="post" action="{{route('order.create-order')}}">

                        </form>
                        <span id="sub-order-btn" class="btn btn-important btn-w200x48 f16 mt15 mr20">下单完成并支付</span>
                    </div>
                    <div class="f14 c-999 fr lh80" >
                        <a id="back-shop-cart" href="{{route('cart.cart-list')}}" class="f14 c-999 fr">返回购物车</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- foot_nav -->
    <div id="foot_nav"></div>
    <div id="bottom_main"></div>

    <!-- 收货人资料以及送货方式 模板 -->
    <script type="text/template" id="addr-templ">
        <% _.each(obj, function(item) { %>
        <div class="choose-address clearfix">
            <label for="addr_<%=item.id%>">
                <div class="choose-radio ml20 mt5">
                    <input type="radio" name="addr" id="addr_<%=item.id%>" data-id="<%=item.id%>" class="old-address" value="<%=item.id%>">
                </div>
                <div class="data-address">
                    <div> <%=item.addr %></div>
                </div>
                <div class="consignee-name">
                    <div class="name-l f14">
                        收货人姓名：
                    </div>
                    <div class="name-r f14">
                        <%=item.name %> &nbsp;&nbsp; <%=item.tel %>
                    </div>
                </div>
            </label>

            <div class="operate ml50">
            <span addr-id="<%=item.id%>" class="c-coffee f14 lh30 sel-del" style="cursor:pointer;">
                删除
            </span>
            </div>
        </div>
        <% }); %>

    </script>

    <!-- 发票模板 -->
    <script type="text/template" id="invoice-templ">
        <% _.each(obj, function(item){ %>
        <div class="choose-address clearfix">
            <label for="invoice_<%=item.id%>">
                <div class="choose-radio ml20 mt5">
                    <input type="radio" name="invoice-item" id="invoice_<%=item.id%>" data-id="<%=item.id%>" class="old-invoice"  value="<%=item.id%>">
                </div>
                <div class="data-address f14 c-333 lh30 ml15 w200" style="overflow:hidden;white-space: nowrap;text-overflow: ellipsis;">
                    <%=item.name%>
                </div>
                <div class="lh30 ml15 f14">
                    <%if(item.type == "1"){%>
                        普通发票
                        <% }else{%>
                    增值发票
                    <%}%>
                </div>

            </label>
            <div class="operate ml50">
            <span invoice-id="<%=item.id%>" class="c-coffee f14 lh30 sel-del" style="cursor:pointer;">
                删除
            </span>
            </div>

        </div>
        <% }); %>
    </script>

    <!-- 订单-店铺商品信息 -->
    <script type="text/template" id="store-templ">

        <% _.each(obj, function(storeItem){ %>
        <div class="cart-store-list mt10 clearfix fl wbb">
            <div class="clearfix wbb lh35">
        <span class="c-999 lh35">
            店铺：
        </span>
                <a class="c-coffee lh35" href="javascript:void(0);">
                    <%=storeItem.storeName%>
                </a>
            </div>
            <div class="head bdd">
                <ul class="clearfix">
                    <li class="wb10">
                    </li>
                    <li class="wb30">
                        商品名称
                    </li>
                    <li class="wb20">
                        规格
                    </li>
                    <li class="wb10">
                        价格
                    </li>
                    <li class="wb10">
                        数量
                    </li>
                    <li class="wb20">
                        小计
                    </li>
                </ul>
            </div>
            <div class="car-shop">
                <% _.each(storeItem.goodsList, function(goodItem){ %>
                <ul class="clearfix">
                    <li class="wb10 tc mt20">
                        <img src="<%=goodItem.img %>">
                    </li>
                    <li class="wb30">
                <span class="c-coffee f14 mt30 mt30 fl">
                    <%=goodItem.goodName %>
                </span>
                    </li>
                    <li class="wb20 tc c-666">
                        <%=goodItem.format %>
                    </li>
                    <li class="wb10 tc b002">
                        ￥<%=goodItem.price %>
                    </li>
                    <li class="wb10 tc c-666">
                        <%=goodItem.amount %>
                    </li>
                    <li class="wb20 tc b002 f18">
                        ￥<%=goodItem.total %>
                    </li>
                </ul>
                <% }); %>


                <div class="message-input">
                    <textarea placeholder="给卖家留言（选填）" store-id="<%=storeItem.storeid %>" name="<%=storeItem.storeid %>_txt" class="sel-text"></textarea>
                    <!-- "textarea"标签不能换行-否则 "placeholder"属性失效. -->
                </div>
            </div>
        </div>
        <% }); %>
    </script>

    <script type="text/template" id="addr-option-templ">
        <option value="">请选择</option>
        <% _.each(obj, function(item){%>
        <option value="<%=item.code %>"><%=item.text %></option>
        <% }); %>
    </script>


    <link rel="stylesheet" href="/assets/b2b/css/ui-dialog.css">
    <script src="/assets/b2b/js/libs/dialog-min.js"></script>
    <script src="/assets/b2b/js/libs/jquery.validate.min.js"></script>
    <script src="/assets/b2b/js/libs/messages_zh.js"></script>
    <script src="/assets/b2b/js/libs/page/common.plugin.js"></script>


    <script src="/assets/b2b/js/pageModules/common/C17.js"></script>

@stop

